home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / Prograph Classic 2.6.1 / Prograph Reference Manual / Prograph Reference 5-7 / Prograph Reference 5-7.rsrc / TEXT_177.txt < prev    next >
Encoding:
Text File  |  1995-10-25  |  11.5 KB  |  558 lines

  1.  
  2. Text
  3.  
  4.  
  5. __________________________________________
  6. TextFont  *388*
  7.  
  8. Input names:   font
  9.  
  10. Input types:   integer
  11.  
  12. Description:   Sets the current grafPort‚Äôs font to the given font. The initial font number is 0, the system font.
  13.  
  14.  You can use the following constants to specify the font; for more information see Inside Macintosh.
  15.  
  16. constant value 
  17.  
  18. applFont    1    
  19.  
  20. athens    7    
  21.  
  22. cairo    11    
  23.  
  24. courier    22    
  25.  
  26. geneva    3    
  27.  
  28. helvetica     21    
  29.  
  30. losAngeles    12    
  31.  
  32. monaco     4    
  33.  
  34. newYork     2    
  35.  
  36. sanFran     8    
  37.  
  38. systemFont    0  (normally Chicago)    
  39.  
  40. times    20    
  41.  
  42. toronto     9    
  43.  
  44. venice    5    
  45.  
  46.  
  47. __________________________________________
  48. TextFace *389*
  49.  
  50. Input names:   face
  51.  
  52. Input types:   integer
  53.  
  54. Description:   Sets the current grafPort‚Äôs character style to one or a combination of bold, italic, underline, outline, shadow, condense, and extend. The names ‚Äúbold‚Äù‚Ķ‚Äúextend‚Äù are names of Macintosh constants. Combinations are created by adding (or ORing using the bit-or primitive) together the values of the appropriate constants.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.        
  63.  
  64. __________________________________________
  65. TextMode *389*
  66.  
  67. Input names:   mode
  68.  
  69. Input types:   integer
  70.  
  71. Description:   Sets the current grafPort‚Äôs transfer mode for drawing text. The mode should be srcOr, srcXor, or srcBic.
  72.  
  73.  
  74. __________________________________________
  75. TextSize  *390*
  76.  
  77. Input names:   size
  78.  
  79. Input types:   integer
  80.  
  81. Description:   Sets the current grafPort‚Äôs font size to the given number of points.  The initial setting is 0, the system font size (12 points).
  82.  
  83.  
  84. __________________________________________
  85. SpaceExtra  *390*
  86.  
  87. Input names:   extra
  88.  
  89. Input types:   integer
  90.  
  91. Description:   Sets the current grafPort to specify the average number of pixels by which to widen each space in a line of text.
  92.  
  93.  
  94. __________________________________________
  95. DrawChar  *390*
  96.  
  97. Input names:   ch
  98.  
  99. Input types:   integer
  100.  
  101. Description:   Draws the character at the current pen location.
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. __________________________________________
  109. DrawString  *390*
  110.  
  111. Input names:   s
  112.  
  113. Input types:   string
  114.  
  115. Description:   Draws the string at the current pen location.
  116.  
  117.  
  118. __________________________________________
  119. DrawText  *390*
  120.  
  121. Input names:   textBuf, firstByte, byteCount
  122.  
  123. Input types:   Ptr, integer, integer
  124.  
  125. Description:   Draws the string(s) up to byteCount characters in the textBuf at the current pen location.
  126.  
  127.  
  128. __________________________________________
  129. CharWidth  *391*
  130.  
  131. Input names:   ch
  132.  
  133. Input types:   integer
  134.  
  135. Output names:      width
  136.  
  137. Output types:   integer
  138.  
  139. Description:   Returns the width of the specified character.
  140.  
  141.  
  142. __________________________________________
  143. StringWidth *391*
  144.  
  145. Input names:   s
  146.  
  147. Input types:   string
  148.  
  149. Output names:   width
  150.  
  151. Output types:   integer
  152.  
  153. Description:   Returns the width of the specified string.
  154.  
  155.  
  156. __________________________________________
  157. TextWidth  *391*
  158.  
  159. Input names:   textBuf, firstByte, byteCount
  160.  
  161. Input types:   Ptr, integer, integer
  162.  
  163. Output names:   width
  164.  
  165. Output types:   integer
  166.  
  167. Description:   Returns the width of the text stored in textBuf, for byteCount characters.
  168.  
  169.  
  170. __________________________________________
  171. Drawing in Color  *391*
  172.  
  173. You can use the following constants to specify the foreground and background colors; for more information, see Inside Macintosh.
  174.  
  175. constant value 
  176.  
  177. blackColor    33    
  178.  
  179. whiteColor    30     
  180.  
  181. redColor    205    
  182.  
  183. greenColor    341    
  184.  
  185. blueColor    409    
  186.  
  187. cyanColor    273    
  188.  
  189. magentaColor    137    
  190.  
  191. yellowColor    69    
  192.  
  193.  
  194. __________________________________________
  195. ForeColor  *392*
  196.  
  197. Input names:   color
  198.  
  199. Input types:   integer
  200.  
  201. Description:   Sets the foreground color for all drawing in the current grafPort to the given color.
  202.  
  203.  
  204. __________________________________________
  205. BackColor  *392*
  206.  
  207. Input names:   color
  208.  
  209. Input types:   integer
  210.  
  211. Description:   Sets the background color for all drawing in the current grafPort to the given color.
  212.  
  213.  
  214. __________________________________________
  215. ColorBit  *392*
  216.  
  217. Input names:   whichBit
  218.  
  219. Input types:   integer
  220.  
  221. Description:   Called by printing software for a color printer, or other color-imaging software, to set the current grafport‚Äôs colrBit field to whichBit; this tells QuickDraw which plane of the color picture to draw into.
  222.  
  223.  
  224. __________________________________________
  225. RGB Colors  *392*
  226.  
  227. The following color calls work with the new red, green and blue colors as described in  Inside Macintosh.
  228.  
  229.  
  230. __________________________________________
  231. RGBForeColor  *392*
  232.  
  233. Input names:   color
  234.  
  235. Input types:   RGBColor
  236.  
  237. Description:   Sets the foreground color for all drawing in the current grafPort to the given color.
  238.  
  239.  
  240. __________________________________________
  241. RGBBackColor  *393*
  242.  
  243. Input names:   color
  244.  
  245. Input types:   RGBColor
  246.  
  247. Description:   Sets the background color for all drawing in the current grafPort to the given color.
  248.  
  249.  
  250. __________________________________________
  251. GetForeColor *393*
  252.  
  253. Input names:   color
  254.  
  255. Input types:   RGBColor
  256.  
  257. Output names:   color
  258.  
  259. Output types:   RGBColor *393*
  260.  
  261. Description:   Returns the RGB components of the foreground color set in the current grafPort.
  262.  
  263.  
  264. __________________________________________
  265. GetBackColor *393*
  266.  
  267. Input names:   color
  268.  
  269. Input types:   RGBColor
  270.  
  271. Output names:   color
  272.  
  273. Output types:   RGBColor
  274.  
  275. Description:   Returns the RGB components of the background color set in the current grafPort.
  276.  
  277.  
  278. __________________________________________
  279. SetCPixel *393*
  280.  
  281. Input names:   h, v, cPix
  282.  
  283. Input types:   integer, integer, RGBColor
  284.  
  285. Description:   Sets the pixel at the given position to the pixel value closest to the given RGB value, in the current grafPort.
  286.  
  287.  
  288. __________________________________________
  289. GetCPixel *393*
  290.  
  291. Output names:   h, v, cPix
  292.  
  293. Output types:   integer, integer, RGBColor
  294.  
  295. Description:   Gets the RGB value of the pixel at the given position in the current grafPort.
  296.  
  297. Rectangles
  298.  
  299.  
  300. __________________________________________
  301. Calculations with Rectangles  *394*
  302.  
  303.  
  304. __________________________________________
  305. SetRect *394*
  306.  
  307. Input names:   r, left, top, right, bottom
  308.  
  309. Input types:   Rect, integer, integer, integer, integer
  310.  
  311. Output names:      r
  312.  
  313. Output types:   Rect  
  314.  
  315. Description:   Assigns the four boundary coordinates to the given rectangle. The result is a rectangle with coordinates (left,top) (right,bottom). 
  316.  
  317.  
  318. __________________________________________
  319. OffsetRect *394*
  320.  
  321. Input names:   r, dh, dv
  322.  
  323. Input types:   Rect, integer, integer 
  324.  
  325. Output names:   r
  326.  
  327. Output types:   Rect 
  328.  
  329. Description:   Moves the given rectangle by adding dh to each horizontal coordinate and dv to each vertical coordinate.  This doesn‚Äôt affect the screen unless a routine is subsequently called to draw within the rectangle.
  330.  
  331.  
  332. __________________________________________
  333. InsetRect *394*
  334.  
  335. Input names:   r, dh, dv
  336.  
  337. Input types:   Rect, integer, integer 
  338.  
  339. Output names:   r
  340.  
  341. Output types:   Rect 
  342.  
  343. Description:   Shrinks or expands the given rectangle.  The left and right sides are moved in by the amount specified by dh; the top and bottom are moved toward the center by the amount specified by dv.
  344.  
  345.  
  346. __________________________________________
  347. SectRect  *395*
  348.  
  349. Input names:   src1, src2, dstRect 
  350.  
  351. Input types:      Rect, Rect, Rect
  352.  
  353. Output names:   dstRect, Boolean
  354.  
  355. Output types:   Rect, boolean
  356.  
  357. Description:   Calculates the rectangle that‚Äôs the intersection of the two given rectangles, and returns TRUE if they indeed intersect or FALSE if they don‚Äôt. 
  358.  
  359.  
  360. __________________________________________
  361. UnionRect  *395*
  362.  
  363. Input names:   src1, srct2, dstRect 
  364.  
  365. Input types:   Rect, Rect, Rect
  366.  
  367. Output names:   dstRect 
  368.  
  369. Output types:   Rect 
  370.  
  371. Description:   Calculates the smallest rectangle that encloses both of the given rectangles.
  372.  
  373.  
  374. __________________________________________
  375. PtInRect  *395*
  376.  
  377. Input names:   pt, r
  378.  
  379. Input types:   Point, Rect 
  380.  
  381. Output names:   Boolean
  382.  
  383. Output types:   boolean
  384.  
  385. Description:   Determines if the pixel below and to the right of the given coordinate point is enclosed in the specified rectangle, and returns TRUE if so or FALSE if not.
  386.  
  387.  
  388. __________________________________________
  389. Pt2Rect  *395*
  390.  
  391. Input names:   pt1, pt2, dstRect
  392.  
  393. Input types:      Point, Point, Rect
  394.  
  395. Output names:   dstRect 
  396.  
  397. Output types:      Rect 
  398.  
  399. Description:   Calculates the smallest rectangle that encloses the two given points.
  400.  
  401.  
  402. __________________________________________
  403. PtToAngle  *396*
  404.  
  405. Input names:   r, pt, angle
  406.  
  407. Input types:   Rect, Point, integer
  408.  
  409. Output names:   angle 
  410.  
  411. Output types:      integer 
  412.  
  413. Description:   Calculates an integer angle between a line from the center of the rectangle to the given point and a line from the center of the rectangle pointing straight up (12 o‚Äôclock high).
  414.  
  415.  
  416. __________________________________________
  417. EqualRect  *396*
  418.  
  419. Input names:   rect1, rect2
  420.  
  421. Input types:   Rect, Rect 
  422.  
  423. Output names:   Boolean
  424.  
  425. Output types:   boolean
  426.  
  427. Description:   Returns a boolean for the comparison of the two rectangles:   TRUE if both have identical boundary coordinates, FALSE otherwise.
  428.  
  429.  
  430. __________________________________________
  431. EmptyRect  *396*
  432.  
  433. Input names:   r 
  434.  
  435. Input types:   Rect
  436.  
  437. Output names:   Boolean
  438.  
  439. Output types:   boolean
  440.  
  441. Description:   Returns TRUE if the given rectangle is an empty rectangle or FALSE if not.  A rectangle is considered empty if the bottom coordinate is less than or equal to the top or the right coordinate is less than or equal to the left. 
  442.  
  443.  
  444. __________________________________________
  445. Graphic Operations on Rectangles  *396*
  446.  
  447. NOTE:    The pen location is not changed by the procedures for graphic operations on rectangles, ovals, rounded-corner rectangles, arcs and wedges.
  448.  
  449.  
  450. __________________________________________
  451. FrameRect  *397*
  452.  
  453. Input names:   r 
  454.  
  455. Input types:   Rect
  456.  
  457. Description:   Draws an outline just inside the specified rectangle using the current grafPort‚Äôs pen pattern, mode, and size.
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. __________________________________________
  467. PaintRect  *397*
  468.  
  469. Input names:   r 
  470.  
  471. Input types:   Rect
  472.  
  473. Description:   Paints the specified rectangle with the current grafPort‚Äôs pen pattern and mode. 
  474.  
  475.  
  476. __________________________________________
  477. EraseRect  *397*
  478.  
  479. Input names:   r 
  480.  
  481. Input types:   Rect
  482.  
  483. Description:   Paints the specified rectangle with the current grafPort‚Äôs background pattern bkPat.
  484.  
  485.  
  486. __________________________________________
  487. InvertRect  *397*
  488.  
  489. Input names:   r 
  490.  
  491. Input types:   Rect
  492.  
  493. Description:   Inverts the pixels enclosed by the specified rectangle:    every white pixel becomes black and every black pixel becomes white.
  494.  
  495.  
  496. __________________________________________
  497. FillRect  *397*
  498.  
  499. Input names:   r, pat 
  500.  
  501. Input types:   Rect, Pattern
  502.  
  503. Description:   Fills the specified rectangle with the given pattern.
  504.  
  505.  
  506. __________________________________________
  507. Ovals
  508.  
  509.  
  510. __________________________________________
  511. FrameOval  *398*
  512.  
  513. Input names:   r 
  514.  
  515. Input types:   Rect
  516.  
  517. Description:   Draws an outline just inside the oval that fits inside the specified rectangle using the current grafPort‚Äôs pen pattern, mode, and size.
  518.  
  519.  
  520. __________________________________________
  521. PaintOval *398*
  522.  
  523. Input names:   r 
  524.  
  525. Input types:   Rect
  526.  
  527. Description:   Paints an oval just inside the specified rectangle with the current grafPort‚Äôs pen pattern and mode.
  528.  
  529.  
  530. __________________________________________
  531. EraseOval  *398*
  532.  
  533. Input names:   r 
  534.  
  535. Input types:   Rect
  536.  
  537. Description:   Paints an oval just inside the specified rectangle with the current grafPort‚Äôs background pattern bkPat.
  538.  
  539.  
  540. __________________________________________
  541. InvertOval  *398*
  542.  
  543. Input names:   r 
  544.  
  545. Input types:   Rect
  546.  
  547. Description:   Inverts the pixels enclosed by an oval just inside the specified rectangle:    every white pixel becomes black and every black pixel becomes white.
  548.  
  549.  
  550. __________________________________________
  551. FillOval  *398*
  552.  
  553. Input names:   r, pat 
  554.  
  555. Input types:   Rect, Pattern
  556.  
  557. Description:   Fills an oval just inside the specified rectangle with the given pattern.
  558.